<template>
    <div class="recruitment_info">
        <el-form ref="form" :model="employForm" label-width="120px">
            <el-form-item label="招聘信息：" class="mgTop">
                <el-input type="textarea" v-model="employForm.employinfo" :rows="8"></el-input>
            </el-form-item>
            <el-form-item class="mgTop">
                <el-button type="primary" @click="onSubmit" :loading="loading">提交</el-button>
                <!--        <el-button>取消</el-button>-->
            </el-form-item>
        </el-form>
    </div>
</template>

<script>
    import { updateEmployInfo, getEmployInfo } from '@/api/eventManage'
    export default {
        data() {
            return {
                loading:false,
                fileLoading: false,
                mottoFileList: [],
                employForm: {
                    employinfo: ''
                }
            }
        },
        created() {
            //
            this.getEmpInfo()
        },
        methods: {
            async getEmpInfo(){
                const res = await getEmployInfo()
                this.employForm.employinfo = res.message
              /*  console.log(res)*/
            },
            async onSubmit(){
                this.loading = true
                await updateEmployInfo(this.employForm)
                this.loading = false
                this.$message({
                    type: 'success',
                    message: '更新成功'
                })

            }
        },
        computed: {},
        components: {}
    }
</script>

<style lang="scss" scoped>
    .recruitment_info{
        width: 55%;
        .mgTop{
            margin-top: 20px;
        }
    }

</style>
